//=======================================================
//AUTHOR: JEFF XL. ZHANG ARIZONA STATE UNIVERSITY
//ALL RIGHTS RESERVED  2008
//=======================================================
#pragma once
#include <cv.h>
#include <cxcore.h>
#include <highgui.h>
#include <math.h>
#include <vector>
#include <stdio.h>
#include <iostream>
#include "line.h"
#include "display.h"
#include "data_structure.h"
#include "interpolation.h"

using namespace std;

class ImageFeature{
	
public:
	vector<Histogram> Hists;		//FOR EACH EDGE IN THIS IMAGE
	ImageFeature();
	ImageFeature(IplImage *img);
	ImageFeature::ImageFeature(IplImage *aimg,const vector<Line> lines);
	vector<Line> get_lines() const;
	int NUM_H;		//HORIZONTAL
	int NUM_V;		//VERTICAL
	int NUM_A;		//AMBIGUOUS
	IplImage* get_image() const;
	void set_image(IplImage* img);
	void set_lines(vector<Line> lines);
private:
	IplImage* _TheImage;		//ORIGINAL Image
	vector<Line> _Lines;		//ORIGINAL LINE SEGMENT TO BE OPERATED ON (***is this correct?***)
};

ImageFeature::ImageFeature(){
	//DEFAULT CONSTRUCTOR
	NUM_H = 0;
	NUM_V = 0;
	NUM_A = 0;
}

ImageFeature::ImageFeature(IplImage *img){
	//ALTERNATIVE CONSTRUCTOR
	NUM_H = 0;
	NUM_V = 0;
	NUM_A = 0;
	_TheImage = img;
}


ImageFeature::ImageFeature(IplImage *aimg,const vector<Line> lines){
//LineFeature::LineFeature(Line aline){
	NUM_H = 0;
	NUM_V = 0;
	NUM_A = 0;
	_TheImage = aimg;
	_Lines = lines;
}


vector<Line> ImageFeature::get_lines() const{
	return _Lines;
}

IplImage* ImageFeature::get_image() const{
	return _TheImage;
}

void ImageFeature::set_image(IplImage *img){
	_TheImage = img;
}

void ImageFeature::set_lines(vector<Line> lines){
	_Lines = lines;
}